﻿@model AnYeCun.Entity.ShareCode.ShareCodeClassEntity
@{
    ViewBag.Title = "Add";
}
<p>
    @Html.ActionLink("返回列表", "Index")
</p>
@using (@Html.BeginForm("Add", "ShareCodeClass", FormMethod.Post, new { id = "form1" }))
{ 
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>新增</legend>
        <div class="editor-label">
            @Html.Label("类别名称（中文）"):
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
        </div>
        <div class="editor-label">
            @Html.Label("类别名称（英文）"):
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NameEN)
        </div>
        <div class="editor-label">
            @Html.Label("编码"):
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Code)
        </div>
        <p>
            <input type="button" onclick="formSubmit()" value="保存" />
        </p>
    </fieldset>
}
<script type="text/javascript">
    function formSubmit() {
        if (jDoc("Name").value.trim() == "") {
            alert("请输入'类别名称（中文）'");
            jDoc("Name").focus();
            return;
        }
        jDoc("form1").submit();
    }
</script>
